<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <ui:composition template="layout.xhtml">
        <ui:define name="body">
            <h2>Novo Questionário</h2>
            <h:form id="form" acceptcharset="utf-8">
                <p:panel styleClass="container_24 clearfix " style="width: 100%; background: none; border: none;">
                    <p:growl id="msg" life="3000" />

                    <p class="subtitle">Dados Questionário</p>
                    <h:panelGrid columns="2" >
                        <p:outputLabel value="Título :" style=" float: right; color: black; font-size: 12px; font-family: sans-serif"/>
                        <p:inputText id="title" value="#{managerCreateQuestionnaire.questionnaire.titulo}" title="Adicione um título para o Questionário" size="50"/>
                        <p:outputLabel value="Categoria :" style=" float: right; color: black; font-size: 12px; font-family: sans-serif"/>
                        <p:selectCheckboxMenu value="#{managerCreateQuestionnaire.selectCategory}" label="" converter="categoryConverter" 
                                              panelStyle="width:319px" 
                                              style="width: 319px; height: 25px;">    
                            <f:selectItems value="#{managerCreateQuestionnaire.lstCategorys()}" var="lcs" itemLabel="#{lcs.name}" />  
                        </p:selectCheckboxMenu>
                    </h:panelGrid>

                    <center>
                        <p:commandButton value="Salvar" icon="ui-icon-disk" style=" width: 80px; font-size: 12px; font-family: sans-serif;" actionListener="#{managerCreateQuestionnaire.save()}" update="@form"/>
                        <p:commandButton value="Cancelar" icon="ui-icon-close" style="font-size: 12px; font-family: sans-serif;" actionListener="#{managerRedirect.redirect('viewQuestionnaire.xhtml')}" immediate="true"/>
                    </center>    
                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>

</html>